void main() {
  var warning = 'Extensions are here!';
  warning.scream(); // prints "EXTENSIONS ARE HERE!"
  print(warning.nah());
  5.times(() => print('hello'));
  print(null.stop('!!!')); // prints null!!!
}

extension on String {
  void scream() => print(toUpperCase());
}

extension on int {
  void times(Function f) {
    for (var i = 0; i < this; i++) {
      f();
    }
  }
}

extension Silliest on Object {
  int nah() => hashCode + 42;

  Type please() => runtimeType;

  bool notAgain(Object other) => this != other;
}

extension ExtremelySilly on Null {
  String stop(String x) => toString() + x;
}
